package com.gec.zhs.entity.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gec.zhs.entity.enums.DateTimePatternEnum;
import com.gec.zhs.utils.DateUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author zhs
 * @version 1.0
 * @date 2025-01-06
 * @description 粉丝，关注表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserFocus implements Serializable {


    /**
     * 用户ID
     */
    private String userId;

    /**
     * 关注用户ID
     */
    private String focusUserId;

    /**
     * 关注时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date focusTime;

    /**
     * 目标用户的昵称，用于展示该用户的信息
     */
    private String otherNickName;

    /**
     * 目标用户的ID，便于进一步的用户信息查询
     */
    private String otherUserId;

    /**
     * 目标用户的个人简介，简要介绍该用户
     */
    private String otherPersonIntroduction;

    /**
     * 目标用户的头像
     */
    private String otherAvatar;

    /**
     * 关注类型，（例如：普通关注、特别关注等）
     */
    private Integer focusType;



    @Override
    public String toString() {
        return "用户ID:" + (userId == null ? "空" : userId) + "，关注用户ID:" + (focusUserId == null ? "空" : focusUserId) + "，关注时间:" + (focusTime == null ? "空" : DateUtil.format(focusTime,
                DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()));
    }
}
